<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>改布局</title>
    <style>
        .container{
            border: 5px solid black;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }
        .one{
            width: 150px;
            height: 150px;
            border: 3px solid darkgoldenrod;
            line-height: 150px;
            font-size: 50px;
            text-align: center;

        }

        @media screen and (min-width: 1024px){
            .one{
                flex-basis: 30%;
            }
        }

        @media screen and (min-width:640px) and (max-width: 1023px) {
            .one{
                flex-basis: 45%;
            }
        }

        @media screen and (min-width:320px) and (max-width: 639px) {
            .one{
                flex-basis: 100%;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="one">1</div>
        <div class="one">2</div>
        <div class="one">3</div>
        <div class="one">4</div>
        <div class="one">5</div>
        <div class="one">6</div>
    </div>
</body>
</html>